import http from '../../utils/http'

export const createPermissions = (input) => http.post('/cms/permission', input)
export const getPermissionsByUserId = (id) => http.get(`/teacher/${id}`)
export const getPermissions = (params) => http.get('/cms/permission/all', { params })
export const getPermissionsAsTree = () => http.get('/cms/permission/tree')
export const updatePermission = (input) => http.put('/cms/permission', input)
export const deletePermissions = (list) => http.delete('/cms/permission', { data: { permissionId: list } })
